1.0.23 • Published 4 years ago

field_name_helper v1.0.23

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Field Name Helpers

Introduction

Field Name helpers is a small library (for now ) just with two function. 1. nameGenerator(str, slices, idKey) - accepts three non mandatory arguments.

a)str - the string from to generate a field name

b) slices - array (indexed slices from the string) -example some long name -> slices would be 0,1,2 and result came case name someLongName

let name = "some name";
const modifiedName = nameGenerator(name,[],null)
modifiedName= "someName";
let longName = "This is really a long name";// we will take 3 indexed chunks
const longModifiedName = nameGenerator(longName, [2,4,5], null)
longModifiedName = 'reallyLongName'

if you leave the slices array empty it will create by default a name from the first two indexes of the string 2. uniqueFieldName(items) - accepts array of objects which must have as a key name.

Installation

npm install --save field_name_helper

Licence

This project is licensed under the terms of the MIT license.

1.0.22

4 years ago

1.0.23

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago